package com.dindang.maintenance.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.dindang.maintenance.mvp.contract.MaintainDetailsContract;
import com.dindang.maintenance.mvp.model.MaintainDetailsModel;


@Module
public class MaintainDetailsModule {
    private MaintainDetailsContract.View view;

    /**
     * 构建MaintainDetailsModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public MaintainDetailsModule(MaintainDetailsContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    MaintainDetailsContract.View provideMaintainDetailsView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    MaintainDetailsContract.Model provideMaintainDetailsModel(MaintainDetailsModel model) {
        return model;
    }
}